package cn.zhc.com.http.listener;

import com.liulishuo.filedownloader.BaseDownloadTask;

/**
 * Created by zhouhongchun on 2017/8/9.
 */

public interface OnHttpDownLoadListener {

    void downLoadPending(BaseDownloadTask task, int completedBytes, int totalBytes);
    void downloadConnected(BaseDownloadTask task, String etag, boolean isContinue, int completedBytes, int totalBytes);
    void downloadProgress(BaseDownloadTask task, int completedBytes, int totalBytes);
    void downloadBlockComplete(BaseDownloadTask task);
    void downloadRetry(final BaseDownloadTask task, final Throwable ex, final int retryingTimes, final int completedBytes);
    void downloadCompleted(BaseDownloadTask task);
    void downLoadPaused(BaseDownloadTask task, int completedBytes, int totalBytes);
    void downLoadError(BaseDownloadTask task, Throwable e);
    void downLoadWarn(BaseDownloadTask task);
}
